import java.util.Scanner;

public class Test3 {
    public static int feiDiGui(int n) {
        int a = 1;
        int b = 1;
        while (n - 1 > 0) {
            int c = a + b;
            a = b;
            b = c;
            n--;
        }
        return b;
    }

    public static int feiBoEr(int n) {
        if (n == 1 || n == 2) {
            return 1;
        }
        return feiBoEr(n - 1) + feiBoEr(n - 2);
    }


    public static void main3(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNextInt()) {
            System.out.println("输入要求第几项的斐波尔那锲数");
            int n = sc.nextInt();
            int a = feiBoEr(n);
            System.out.println(a);
        }
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNextInt()) {
            System.out.println("输入要求第几项的斐波尔那锲数");
            int n = sc.nextInt();
            int a = feiDiGui(n);
            System.out.println(a);
        }
    }
}

